﻿using CKS2320.Common.Model;
using CKS2320.Service.Interface;
using Microsoft.AspNetCore.Mvc;

namespace CKS2320.WebApi.Controllers
{
    /// <summary>
    /// 
    /// </summary>
    [Route("api/[controller]")]
    [ApiController]
    public class VoltageWithstandController : ControllerBase
    {
        private IVoltageWithstandService _voltageWithstandService;
        /// <summary>
        /// 
        /// </summary>
        /// <param name="voltageWithstandService"></param>
        public VoltageWithstandController(IVoltageWithstandService voltageWithstandService)
        {
            _voltageWithstandService = voltageWithstandService;
        }
        /// <summary>
        /// 新增数据
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        [HttpPost("Add")]
        public IActionResult Add(VoltageWithstandModel req)
        {
            return Ok(_voltageWithstandService.Add(req));
        }
    }
}
